[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FP_OFF() Get or Set Offset Portion of a Far Pointer (Macro)
#include <dos.h>
unsigned FP_OFF(longptr);
void far *longptr; Long pointer to memory address
FP_OFF() gets or sets the offset portion of the far pointer
'longptr'.
Returns: An unsigned integer representing an offset.
Notes: FP_OFF() is a macro.
Portability: MS-DOS only.
-------------------------------- Example ---------------------------------
The following example gets the segment and offset portion of a far
pointer and increments the offset by one.
#include <dos.h>
void far *ptr;
unsigned int off_val, seg_val;
main()
{
seg_val = FP_SEG(ptr);
off_val = FP_OFF(ptr);
FP_OFF(ptr) = ++off_val;
printf("%04x:%04x",seg_val,off_val);
}
See Also:
FP_SEG()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson